From ed620a7b4eaa1948855ca0f952b33fb1aaa0f4b5 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Mon, 8 May 2006 13:41:18 -0600 Subject: [PATCH] [IA64] RSE incomplete cfm In theory, after Guest executes "cover", incomplete frame changes to complete frame. So Guest should set INCOMPL to 0 just after "cover". At least before guest psr.ic and psr.i are turned on. Previously, only when Guest executes "rfi", INCOMPL is set to 0. The window between "cover" and "rfi" causes trouble in below scenario. 1. Application A calls system call. 2. In OS breaks handler entry, INCOMPL is 0. Due to its system call, Linux kernel doesn't execute "cover". 3. Before returning to Application A, schedule happens, Application B begins to run. 4. A TLB miss happens on the context of B, this may make INCOMPL 1, before Returning to B, (that means "rfi" is not executed, and INCOMPL is still 1) schedule happens again. A resumes to run with INCOMPL 1 (this is incorrect now). 5. As mentioned before, this is system call, "cover" is executed in ia64_leave_kernel path. Because INCOMPL is 1, this "cover" is not actually executed, but this "cover" should be executed. 5. Thus application A's frame is destroyed. Issue appears. From: Anthony Xu Signed-off-by: Alex Williamson --- linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h b/linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h index c6df57e9be..b3902a6a80 100644 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h @@ -155,6 +155,8 @@ ;; \ ld4 r30=[r8]; \ ;; \ + /* set XSI_INCOMPL_REGFR 0 */ \ + st4 [r8]=r0; \ cmp.eq p6,p7=r30,r0; \ ;; /* not sure if this stop bit is necessary */ \ (p6) adds r8=XSI_PRECOVER_IFS-XSI_INCOMPL_REGFR,r8; \ -- 2.30.2